/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package air_hockey_v2.gui;

import air_hockey_v2.Main;
import java.applet.Applet;
import java.applet.AudioClip;
import java.net.URL;

/**
 *
 * @author matheus
 */
public class Som {
    
    AudioClip som;
    
    public Som(String filename){
        URL url = Som.class.getResource(filename);
        this.som = Applet.newAudioClip(url);
    }

    public void play() {
        this.som.play();
    }

    public void loop() {
        this.som.loop();
    }

    public void stop() {
        this.som.stop();
    }
    
}
